//
//  BootWindow.h
//  boot
//
//  Created by Demi on 07/03/2017.
//  Copyright © 2017 Azazie. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, BootType) {
    BootTypeAnimatingAndGuide = 0, // Default
    BootTypeAnimatingOnly ,
    BootTypeAnimatingAndGuideForLP ,
    BootTypeAnimatingOnlyForLP
};

typedef NS_ENUM(NSUInteger, BootDismissalAnimationStyle) {
    BootDismissalAnimationStyleNone = 0,
    BootDismissalAnimationStyleLeftTransition,
    BootDismissalAnimationStyleFadeOut,
};

#ifndef BOOT_WINDOW_ANIMATION_DURATION
#define BOOT_WINDOW_ANIMATION_DURATION 0.5f
#endif

@interface BootWindowConfiguration : NSObject

@property (nonatomic, assign, readonly) BootType type;
@property (nonatomic, assign, readonly) BOOL hasSignedIn;
@property (nonatomic, copy, readonly) void(^completion)(void);

@property (nonatomic, copy, readonly) void(^signInCallback)(void);
@property (nonatomic, copy, readonly) void(^signUpCallback)(void);

- (instancetype)initWithType:(BootType)type
                 hasSignedIn:(BOOL)signedIn
                  completion:(void(^)(void))completion
              signInCallback:(void(^)(void))signInCallback
              signUpCallback:(void(^)(void))signUpCallback NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;

@end

@interface BootWindow : UIWindow

- (instancetype)initWithFrame:(CGRect)frame configuration:(BootWindowConfiguration *)configuration NS_DESIGNATED_INITIALIZER;

@property (nonatomic, strong, readonly) BootWindowConfiguration *configuration;

- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;

- (void)dismissWithStyle:(BootDismissalAnimationStyle)style;

@end

NS_ASSUME_NONNULL_END
